package com.xinsoft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinsoft.common.page.CustomBaseMapper;
import com.xinsoft.entity.dto.SysMenuDTO;
import com.xinsoft.entity.po.SysMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author xuhb
* @description 针对表【sys_menu(目录表)】的数据库操作Mapper
* @createDate 2023-04-26 17:17:58
* @Entity com.xinsoft.entity.po.SysMenu
*/
public interface SysMenuMapper extends BaseMapper<SysMenu>, CustomBaseMapper {

    List<SysMenuDTO> listMenuByUserId(@Param("userId") Integer userId, @Param("terminal") Integer terminal);

    List<String> findPermsListByUserId(@Param("userId") Integer userId, @Param("terminal") Integer terminal);

    List<Integer> listMenuIdByRoleId(@Param("roleId") Integer roleId, @Param("terminal") Integer terminal);
    List<Integer> listMenuIdByUserId(@Param("userId") Integer roleId, @Param("terminal") Integer terminal);

    List<String> listUserPerms(@Param("userId") Integer userId);
}


